home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / earcd / biz / swood / fw_mef_e.lha / FW_MEf-e / ISeveral_V3.fw < prev    next >
Text File  |  1997-04-27  |  4KB  |  203 lines

  1. /* Optimized with RexxOpt 1.7 */
  2.  
  3. R='0A'X
  4. Dre=0
  5. Sei=0
  6. Address='FinalW'
  7. Options results
  8. STATUS PORTNAME
  9. FW=result
  10. address=FW
  11. SIGNAL ON BREAK_C
  12. SIGNAL ON SYNTAX
  13. 'ShowMessage 2 1 "Insert Several V1.5e - 97/04/27" "© Heiko Schroeder" "E-Mail: age@thepentagon.com" "(-:" "Ok" "(-:"'
  14. GetDocItemPrefs Decimal
  15. Punkt=Result
  16. If Punkt="Comma" then DocItemPrefs Decimal Period
  17. GraphicTool
  18. Ungroup
  19. nr=1
  20. CurrentObject
  21. ObjectId=Result
  22. IF ObjectId=0 THEN;do
  23. 'ShowMessage 1 1 "Macro: Insert Several" "A B O R T" "No graphical object selected..." "Okay" "" ""'
  24. Call BREAK_C
  25. End
  26. Objekt.0=nr;Objekt.nr=ObjectID
  27. FirstObject Selected
  28. ID=result
  29. Call Zaehlen
  30. Do While 1
  31. NextObject ID Selected
  32. ID=result
  33. If ID=0 then Leave
  34. Call Zaehlen
  35. End
  36. If Objekt.0=1 then;do
  37. gruppe=false
  38. end
  39. else gruppe=true
  40. STATUS View
  41. Zoom=result
  42. STATUS Pages
  43. Seiten=result
  44. STATUS Page
  45. Seite=result
  46. kx=9999
  47. ky=9999
  48. If Gruppe=true then
  49. Do a=1 to Objekt.0
  50. GetObjectCoords Objekt.a
  51. Parse var result Soite ax ay rest
  52. if ax<kx then kx=ax
  53. if ay<ky then ky=ay
  54. end
  55. Do a=2 to Objekt.0
  56. SelectObject Objekt.a MULTIPLE
  57. End
  58. SelectObject Objekt.1 MULTIPLE
  59. If Gruppe=true then Group
  60. Copy
  61. IF RC=0 THEN;do
  62. CurrentObject
  63. ObjectID=result
  64. GetObjectCoords ObjectID
  65. Parse var result Seite x y w h
  66. wl=w
  67. hl=h
  68. if Gruppe=true then;do
  69. x=kx;y=ky
  70. End
  71. GetObjectRotation ObjectID
  72. Dreh=result
  73. GetObjectType ObjectID
  74. Typ=result
  75. If Typ=2|Typ=3 then;do
  76. If Seite~=1 then;do
  77. 'ShowMessage 1 1 "FW has problems with lines outside" "the page 1... CANCEL" "" "Okay" "" ""'
  78. Call BREAK_C
  79. End
  80. End
  81. If Gruppe=true then Group
  82. 'ShowMessage 1 0 "Screen output?" "" "" "normal" "speed" ""'
  83. ba=result
  84. IF ba=2 THEN;DO
  85. status WINDOW
  86. parse VAR result links oben width height minwidth minheight maxwidth maxheight
  87. sizewindow minwidth minheight
  88. End
  89. Do While 1
  90. Result="ß"
  91. RequestText '"Insert Several" "Number of copies" ""'
  92. Anzahl=Result
  93. If Anzahl="ß" then call Ende1
  94. If Anzahl=""|Anzahl=0 then call Ende
  95. If Datatype(Anzahl,'W')=1 then leave
  96. else call oops
  97. End
  98. Do while 1
  99. Result="ß"
  100. RequestText '"Insert Several" "Horizontal displacement:" ""'
  101. Hor=Result
  102. If Hor="ß" then call Ende1
  103. If Hor="" then Hor=0
  104. If Datatype(Hor,'N')=1 then leave
  105. else call oops1
  106. End
  107. Do while 1
  108. Result="ß"
  109. RequestText '"Insert Several" "Vertical displacement:" ""'
  110. Ver=Result
  111. If Ver="ß" then call Ende1
  112. If Ver="" then Ver=0
  113. If Datatype(Ver,'N')=1 then leave
  114. else call oops1
  115. End
  116. If Typ~=2&Typ~=3 then;do
  117. Do while 1
  118. Result="ß"
  119. RequestText '"Insert Several" "Rotation:" ""'
  120. Dre=Result
  121. If Dre="ß" then call Ende1
  122. If Dre="" then Dre=0
  123. If Datatype(Dre,'W')=1 then leave
  124. else call oops
  125. End
  126. Do While 1
  127. Result="ß"
  128. RequestText '"Insert Several" "On which page? 0=selected page" ""'
  129. Sei=Result
  130. If Sei="ß" then call Ende1
  131. If Sei=""|Sei=0 then Sei=Seite
  132. If Datatype(Sei,'W')=1 then leave
  133. else call oops
  134. End
  135. end
  136. s=Sei-Seiten
  137. Do a=1 to s
  138. InsertPageBreak
  139. End
  140. If ba=2 then View 20
  141. Do i=1 TO Anzahl
  142. Paste
  143. CurrentObject
  144. ObjectID=Result
  145. a=x+(Hor*i)
  146. b=y+(Ver*i)
  147. Winkel=Dreh+Dre*i
  148. If Typ=2|Typ=3 then;do
  149. w=wl+(Hor*i)
  150. h=hl+(Ver*i)
  151. Sei=Seite
  152. End
  153. SetObjectCoords ObjectID Sei a b w h
  154. SetObjectRotation ObjectID Winkel
  155. If Gruppe=true then Group
  156. End
  157. End
  158. Redraw
  159. Call WH
  160. 'ShowMessage 2 1 "Thanks for using." "" "" "@-`-" "Please" ":-))"'
  161. Exit
  162. ENDE:
  163. Call WH
  164. 'ShowMessage 1 1 "Incorrect number of copies..." "A B O R T" "" "Okay" "" ""'
  165. EXIT
  166. ENDE1:
  167. Call WH
  168. 'ShowMessage 1 1 "You have cancelled..." "© Heiko Schröder" "http://yi.com/home/SchroederHeiko" "Okay" "" ""'
  169. EXIT
  170. SYNTAX:
  171. Call WH
  172. 'ShowMessage 1 1 "There was an error." "Error-identification you can find in »Ram:Error«" "" "Okay" "" ""'
  173. address "REXX"
  174. Open("F","Ram:Error","W")
  175. write ("F","ATTENTION! FW_MEf V1.5e-Error")
  176. write ("F",'Error in line' SIGL ':' ERRORTEXT(RC))
  177. write ("F",'Please report the author. » s93324@fh-telekom-leipzig.de «'||R||R)
  178. Close ("F")
  179. EXIT
  180. BREAK_C:
  181. Call WH
  182. 'ShowMessage 1 1 "Macro-Break..." "" "" "I know..." "" ""'
  183. EXIT
  184. WH:
  185. If ba=2 then;do
  186. GoToPage Sei
  187. View Zoom
  188. sizewindow width height
  189. End
  190. If Punkt="Comma" then DocItemPrefs DECIMAL Comma
  191. Return
  192. Zaehlen:
  193. If ID~=Objekt.1 then;do
  194. nr=nr+1
  195. Objekt.0=nr;Objekt.nr=ID
  196. End
  197. Return
  198. oops:
  199. 'ShowMessage 1 1 "Input error!" "" "" "Okay" "" ""'
  200. return
  201. oops1:
  202. 'ShowMessage 1 1 "Input error!" "Please use (.) !" "" "Okay" "" ""'
  203. return